# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo6.05
# Description:
# Author:       $赵怡蕾
# Date:         2019/2/15
#-------------------------------------------------------------------------------

# 定义一个字典
names1 = {"Bill":20,"Mike":30,"John":40}
# 让names1和names2指向同一个字典
names2 = names1
# 运行结果：{'Bill': 20, 'Mike': 30, 'John': 40}
print(names2)
# 将names1指向一个空的字典
names1 = {}
# 并不会清空names2，运行结果：{'Bill': 20, 'Mike': 30, 'John': 40}
print(names2)

names1 = {'Bill': 20, 'Mike': 30, 'John': 40}
names2 = names1
# 清空names1，同时也清空了names2，运行结果：{}
names1.clear()
print(names2)